package io.r2mo.test.common.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.r2mo.dbe.mybatisplus.core.domain.BaseEntity;
import io.r2mo.dbe.mybatisplus.core.typehandler.TypedUUIDHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.UUID;

/**
 * @author lang : 2025-08-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tk_order_item")
@Schema(name = "订单项")
public class OrderItemEntity extends BaseEntity {

    private String orderSn;

    private String productId;

    private String productName;

    private String productNo;

    private String productScale;    // 规格

    private int quantityDish;
    private BigDecimal amountDish;

    private int quantity;
    private BigDecimal amountUnit;
    private BigDecimal amountTotal;
    private BigDecimal amountDiscount;

    @TableField(typeHandler = TypedUUIDHandler.class)
    private UUID orderId;
}
